<?php

/*

Editing Gallery (edit_gallery.pro.php)

*/
ob_start();
include "global.inc.php";

$find_gallery = fetch("SELECT id FROM usergallerys WHERE owner = '$userid' AND game = '$game'");
if (!$find_gallery[id])
{
	die(header(error("makegallery.php?game=$game","You do not have a gallery yet.")));
}

$gallery_name = smilies(badwords(strip_tags($gallery_name,"<b><i>")));
$gallery_desc = smilies(badwords(strip_tags($gallery_desc,"<b><i><u><a><font><p><br><center><img><table><tr><td>")));

mysql_query("UPDATE usergallerys SET gallery_name = '$gallery_name' WHERE owner = '$userid' AND game = '$game'");
mysql_query("UPDATE usergallerys SET gallery_desc = '$gallery_desc' WHERE owner = '$userid' AND game = '$game'");

die(header(error("edit_gallery.php?game=$game","Your gallery has been edited!")));

?>